﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CodeGame
{
    class StateManager : Entity
    {
        private State CurrentState;

        public void ChangeState(State state)
        {
            this.CurrentState = state;
        }

        public override void Draw()
        {
            if (this.CurrentState == null)
            {
                return;
            }
            this.CurrentState.Draw();
        }

        public override void Update()
        {
            if (this.CurrentState == null)
            {
                return;
            }
            this.CurrentState.Update();
        }

    }
}
